<div id='dp-wrapper-1' class='dp-wrapper hide'>
	<div class='dp-inner-wrapper'>
		<div class='dp-title-wrapper'>
			<a href='<?php echo $this->getPrevUrl()?>' class='dp-btn-month-l'><?php echo $this->getPrevMonth()?>月</a>
			<span class='dp-title'><?php echo $year?>年<?php echo $month?>月</span>
			<a href='<?php echo $this->getNextUrl()?>' class='dp-btn-month-r'><?php echo $this->getNextMonth()?>月</a>
		</div>
		<div class='dp-content-wrapper'>
			<table class='dp-tb-content'>
				<thead>
					<tr>
						<th class='w7'>周日</th><th class='w1'>周一</th>
						<th class='w2'>周二</th><th class='w3'>周三</th>
						<th class='w4'>周四</th><th class='w5'>周五</th>
						<th class='w6'>周六</th>
					</tr>
				</thead>
				<tbody>
					<?php $this->renderContent()?>
				</tbody>
			</table>
		</div>
	</div>
</div>

<script>
	$().ready(function(){
		dlg = null;
		$('#ipt-departure_date').click(function(oEvent) {
			dlg = $.dialog({
				title: false,
				content: document.getElementById('dp-wrapper-1'),
				padding: 0,
				follow: this,
				drag: false,
				close: false
			});
			dlg.dom.content.find('a').live('click', function(oEvent) {
				$.get(this.href, {}, function(result) {
					html = $(result).html();
					$('#dp-wrapper-1').html(html);
				});
				oEvent = oEvent || window.event;
			    if(document.all){
			        oEvent.cancelBubble = true;
			    }else{
			        oEvent.stopPropagation();
			    }
				return false;
			});
			oEvent = oEvent || window.event;
		    if(document.all){
		        oEvent.cancelBubble = true;
		    }else{
		        oEvent.stopPropagation();
		    }
			return false;
		})
		$('#dp-wrapper-1 td.valid').live('click', function() {
			$('#ipt-departure_date').val($(this).attr('val'));
			dlg.close();
		});
		$('body').click(function() {
			if(dlg) dlg.close();
		})
	})	
</script>
